
#ifndef __PHOTO_VIEWER_APPLICATION_H__
#define __PHOTO_VIEWER_APPLICATION_H__
#pragma once
#pragma warning(disable:4996)
#pragma warning(disable:4244)
#include <MzApp.h>
#include "PhotoViewMainWindow.h"
#include "PhotoViewThumbnailManager.h"
#include "CommonUtility.h"

class CPhotoViewerApplication : public CMzApp
{
public:
	CPhotoViewerApplication( void );
	virtual ~CPhotoViewerApplication( void );
	virtual BOOL Init();
	int RefreshThumbDB( SubThreadData* subThreadData );
	int RefreshThumbDBEx( const TCHAR *fileDirectory );
	BOOL IsCalling()
	{
		BOOL ret = FALSE;
		HKEY hKey = NULL;
		if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"DialParameter", 0, KEY_READ, &hKey) == ERROR_SUCCESS) 
		{
			DWORD dwType, dwSize;
			DWORD dwCalling = 0;
			dwSize = sizeof(dwCalling);
			if(RegQueryValueEx(hKey, L"CallStatus", 0, &dwType, (LPBYTE)&dwCalling, &dwSize) != ERROR_SUCCESS)
				dwCalling = 0;
			if( dwCalling == 1 )
			{
				ret = TRUE;
			}
			RegCloseKey(hKey);
		}
		return ret;
	}
private:
	CPhotoViewMainWindow *m_pMainWin;
	SubThreadData *m_subThreadData;
	FileStats m_directoryFileStats;
	
};

#endif

